﻿using log4net;
using log4net.Config;
using Microsoft.Extensions.Configuration;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;

namespace Mate.Framework.Extensions
{
    public static class StartupApplicationExtensions
    {
        public static void InitLog4net(this IConfiguration configuration)
        {
            var repository = LogManager.CreateRepository(configuration.GetValue<string>("Log4net:Repository"));
            XmlConfigurator.Configure(repository, new FileInfo("log4net.config"));
        }
    }
}
